#ifndef FREQGAINUCS_H
#define FREQGAINUCS_H

#include <QPainter>

#include "freqgaincurve.h"
#include "adaptivewidgets.h"

class FreqGainUCS : public AWidget
{
    Q_OBJECT
public:
    explicit FreqGainUCS(QWidget *parent = nullptr);
public slots:
    void setList(const QList<DMVariant> &list);
    void updateDm(const int &index, const DMVariant &dm);
signals:
    void stateChanged(int, DMVariant);
protected:

    void paintEvent(QPaintEvent *event) override;

    // void mousePressEvent(QMouseEvent *event) override;

    // void mouseReleaseEvent(QMouseEvent *event) override;

    QPointF toPoint(const QRectF &rect, const double &freq, const double &gain) const;
private:
    double m_offset;
    QRect m_cRect;
    FreqGainCurve *curve;

};

#endif // FREQGAINUCS_H
